/*
 * Copyright (C) RT, 2017 by kiterunner_t
 * TO THE HAPPY FEW
 */

package com.zgys.mes.util.gson;

import com.google.gson.FieldNamingPolicy;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;


public class GsonFactory {
    public static Gson create() {
        Gson gson = new GsonBuilder()
                .setDateFormat("yyyy-mm-dd hh:mm:ss")
                .create();

        return gson;
    }


    public static Gson createCamelGson() {
        Gson gson = new GsonBuilder()
                .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)
                .setDateFormat("yyyy-mm-dd hh:mm:ss")
                .create();

        return gson;
    }
}

